import factory.Zh0202TemplateFactory;
import template.Zh0202Template;

/**
 * @author: zh
 * @date: 2021/11/18 11:30
 * @version: 1.0
 */
public class Client {
    public static void main(String[] args) {
        Zh0202TemplateFactory factory = new Zh0202TemplateFactory();
        Zh0202Template t1,t2,t3;
        //"天上人间"-"圣帝国际"
        t1 = factory.getTemplate("天上人间");
        t1.use();

        t2 = factory.getTemplate("圣帝国际");
        t2.use();

        t3 = factory.getTemplate("圣帝国际");
        t3.use();

        System.out.println("工厂内一个有"+factory.getTotalTemplates()+"个模板");
        System.out.println("工厂内的模板共有"+factory.getTotalUser()+"个商家在使用");
    }
}
